﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace SienSchoofsProject.Models
{
    public class FilmReview
    {
        public int Id { get; set; }

        [Required]
        [Range(1, 10, ErrorMessageResourceType = typeof(Resources.Resources), ErrorMessageResourceName = "ErrorMsgRevRating")]
        [Display(Name = "ReviewRating", ResourceType = typeof(Resources.Resources))]
        public int Rating { get; set; }

        [Required]
        [StringLength(512, ErrorMessageResourceType = typeof(Resources.Resources), ErrorMessageResourceName = "ErrorMsgRevBodyMaxLength")]
        [Display(Name = "ReviewBody", ResourceType = typeof(Resources.Resources))]
        public string Body { get; set; }

        [Display(Name = "UserName", ResourceType = typeof(Resources.Resources))]
        [DisplayFormat(NullDisplayText = "anonymous")]
        //[Maxwords(1)] //naam mag maximum 1 woord zijn
        public string ReviewerName { get; set; }

        public int FilmId { get; set; }
    }
}